package com.gongj.aop.aspect;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class AspectConfig {

	//对 findById 方法进行增强
	@Before("execution(public * com.gongj.aop.GongService.findById(..))")
	public void beforeConfig(){
		System.out.println("======beforeConfig==================");
	}

	@After("execution(public * com.gongj.aop.GongService.findById(..))")
	public void afterConfig(){
		System.out.println("======afterConfig==================");
	}
}
